<template>
  <el-form-item class="" :label="label">
    <el-select class="select_single w170" :value="value" :placeholder="placeholder" filterable @change="$emit('change',$event)">
      <el-option v-for="item in itemList " :key="item[bindList._attrs.key]" :value="item[bindList._attrs.value]" :label="item[bindList._attrs.label]" />
    </el-select>
  </el-form-item>
</template>
<script>
import {
  DictArray
} from '@/api/publicApi.js'
export default {
  props: ['label', 'placeholder', 'bindList', 'value'],
  data() {
    return {
      itemList: []
    }
  },
  methods: {
    load: async function(...params) {
      console.log(this.bindList, 'bindList')
      this.itemList = await this.bindList.load(...params)
    }
  }
}
</script>
